using UnityEngine;

public class StunExplosion : MonoBehaviour
{
	public float minStunTime;

	public float maxStunTime;

	private void Start()
	{
		Object.Destroy(this, 0.2f);
	}

	private void OnTriggerEnter2D(Collider2D collision)
	{
		if (collision.TryGetComponent<Zombie>(out var component))
		{
			component.flummoxUntil = Time.time + Random.Range(minStunTime, maxStunTime);
		}
	}
}
